package com.xiangge.zuoye.Demo5;

/**
 * @author xiyu
 * @version 1.0
 * @date 2025/3/18 16:02
 * @description
 */
public class Book {
    private int id;
    private String bookname;
    private double price;

    public Book(int id, String bookname, double price) {
        this.id = id;
        this.bookname = bookname;
        this.price = price;
    }

    public Book() {
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getBookname() {
        return bookname;
    }

    public void setBookname(String bookname) {
        this.bookname = bookname;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    public void getInfo(){
        System.out.println("价格最高的图书编号："+id+"，书名："+bookname+"，价格："+price);
    }
}
